<%@ page language="java" import="java.util.*"
	contentType="text/html;charset=utf-8"%>
<% 
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
String message = (String)request.getAttribute("message");
	if(message == null){
		message = "";
	}
	if (!message.trim().equals("")){
		out.println("<script language='javascript'>");
		out.println("alert('"+message+"');");
		out.println("</script>");
	}
	request.removeAttribute("message");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>驾考系统首页</title>
<link href="./themes/css/login.css" rel="stylesheet" type="text/css" />
<SCRIPT language=javascript>
//检验表单的合法性
function checklogin() {
	if (document.loginform.username.value.replace(/\s+$|^\s+/g,"").length<=0) {
		alert("\请输入您的帐号！");
		document.loginform.username.focus();
		return false;
	}
	if (document.loginform.password.value.replace(/\s+$|^\s+/g,"").length<=0) {
		alert("\请输入您的密码！");
		document.loginform.password.focus();
		return false;
	} 
}
</SCRIPT>
</head>

<body>
	<div id="login">
		<div id="login_header">
			<h1 class="login_logo">
				<img src="themes/default/images/login_logo.gif" />
			</h1>
			<div class="login_headerContent">
				<div class="navList">
					<ul>
						<li><a href="#">设为首页</a></li>
						<li><a href="#" target="_blank">帮助</a></li>
					</ul>
				</div>
				<h2 class="login_title"><img src="themes/default/images/login_title.png" /></h2>
			</div>
		</div>
		<div id="login_content" >
			<div class="loginForm" >
				<form name="loginform" method="post" action="<%=basePath %>login.do?method=mlogin" onSubmit="return checklogin();" >
					<p>
						<span>帐号:</span> <input type="text" name="username" size="20"
							class="login_input" />
					</p>
					<p>
						<span>密码:</span> <input type="password" name="password" size="20"
							class="login_input" />
					</p>
					<p>
						<span>身份:</span> 
						<select name="age">
							<option value="1">学员用户</option>
							<option value="2">管理员</option>
						</select>

					</p>
					<div class="login_bar">
						<input class="sub" type="submit" value=" " />
					</div>
				</form>
			</div>
			<div class="login_banner">
				<img src="themes/default/images/login_banner.jpg" />
			</div>
			<div class="login_main">
				<ul class="helpList">
					<li><a href="<%=basePath %>reg.jsp">注册</a></li>
					<li><a href="<%=basePath %>lost.jsp">忘记密码</a></li>

				</ul>
				<div class="login_inner">
					<p>管理员：admin 密码：111</p>
					<p>学生：111 密码：111</p>
					<p>流程是：先用管理员新增学院信息，然后学生才能登陆系统，默认初始密码都是111</p>
				</div>
			</div>
		</div>
		<div id="login_footer">Copyright &copy; 2018 www.bishe.com Inc.
			All Rights Reserved.</div>
	</div>
</body>
</html>